<fieldset>
    <legend>条件搜索</legend>
    <form action="{:request()->url()}" autocomplete="off" class="layui-form layui-form-pane form-search" method="get" onsubmit="return false">

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">债权名称</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="property_name" placeholder="请输入债权名称" value="{:input('property_name','')}">
            </label>
        </div>
        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
            <a class="layui-btn layui-btn-primary" data-form-export="{:url('log')}" type="button">
                <i class="layui-icon layui-icon-export"></i> 导 出
            </a>
        </div>


    </form>
</fieldset>

<script>

    require(['excel'], function (excel) {
        excel.bind(function (data) {
            var items = [];
            items.push(['投资产品', '投资人', '合同编号', '客户编号','投资金额(规模)','债权名称','债权所属人','债权抵押人','债权有效期','债权匹配金额','操作','操作时间',,
                ]);
            data.forEach(function (order) {
                items.push([
                    order.order_info.goods_name,
                    order.order_info.name,
                    order.order_info.contract_no,
                    order.order_info.customer_no,
                    order.order_info.money,
                    order.property_info.name,
                    order.property_info.owner,
                    order.property_info.mortgagor,
                    order.property_info.date,
                    order.match_cost,
                    order.type == 1 ? '抵押' : '解抵',
                    order.create_at,
                ]);
            });
            return items;
        }, '下月应返利息表');
    });

</script>

